﻿@using Kendo.Mvc.UI;
@{
    if (!Request.IsAjaxRequest())
    { Layout = "../Shared/_Layout.cshtml"; }
    else
    { Layout = null; }
}
@model TS2015.Models.TbThiSinh

<div class="panel-body">

    <div id="xettuyen">
        <h2 style="text-align:center; margin-bottom:5px">ĐĂNG KÝ HỒ SƠ XÉT TUYỂN KẾT QUẢ THI TN THPT</h2>
        <div class="form-group">
            <label>1. Điểm Trung học phổ thông :</label><br />
            <div class="col-lg-4 col-md-4">
                <div class="col-lg-3 col-md-3">
                    <div class="row"><strong>Lớp 10:</strong></div>
                </div>
                <div class="col-lg-4 col-md-4">
                    @Html.TextBoxFor(m => m.DiemLop10, new { @class = "form-control", type = "number" })
                </div>
            </div>
            <div class="col-lg-4 col-md-4">
                <div class="col-lg-3 col-md-3">
                    <div class="row"><strong>Lớp 11:</strong></div>
                </div>
                <div class="col-lg-4 col-md-4">
                    @Html.TextBoxFor(m => m.DiemLop11, new { @class = "form-control", type = "number" })
                </div>
            </div>
            <div class="col-lg-4 col-md-4">
                <div class="col-lg-3 col-md-3">
                    <div class="row"><strong>Lớp 12:</strong></div>
                </div>
                <div class="col-lg-4 col-md-4">
                    @Html.TextBoxFor(m => m.DiemLop12, new { @class = "form-control", type = "number" })
                </div>
            </div>
        </div>
        <div class="form-group">
            <label style="margin-top:20px">2. Điểm Tốt nghiệp :</label><br />
            <div class="col-lg-4 col-md-4">
                <div class="col-lg-3 col-md-3">
                    <div class="row"><strong>Toán:</strong></div>
                </div>
                <div class="col-lg-4 col-md-4">
                    @Html.TextBox("MarkRecruitmentBasic", "", new { @class = "form-control", type = "number" })
                    <input type="text" name="SubjectRecruitmentBasic" class="hide" value="Toán" />
                </div>
            </div>
            <div class="col-lg-4 col-md-4">
                <div class="col-lg-3 col-md-3">
                    <div class="row"><strong>Tiếng Anh:</strong></div>
                </div>
                <div class="col-lg-4 col-md-4">
                    @Html.TextBox("MarkRecruitmentBasic", "", new { @class = "form-control", type = "number" })
                    <input type="text" name="SubjectRecruitmentBasic" class="hide" value="Tiếng anh" />
                </div>
            </div>
            <div class="col-lg-4 col-md-4">
                <div class="col-lg-3 col-md-3">
                    <div class="row"><strong>Ngữ văn:</strong></div>
                </div>
                <div class="col-lg-4 col-md-4">
                    @Html.TextBox("MarkRecruitmentBasic", "", new { @class = "form-control", type = "number" })
                    <input type="text" name="SubjectRecruitmentBasic" class="hide" value="Ngữ văn" />
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-lg-6 col-md-6">
                <strong class="row">Môn tự chọn :</strong>
                <div class="col-lg-8 col-md-8">
                    <div class="row">
                        @Html.DropDownList("ddlSubjectRecruitmentBasic", (SelectList)ViewBag.MonTotNghiep, "Chọn Môn...", new { @class = "form-control valid", data_val = "true", data_val_required = " ", aria_required = "true", aria_describedby = "ddlSubjectRecruitmentBasic-error ddlSubjectRecruitmentBasic-error ddlSubjectRecruitmentBasic-error" })
                        @Html.ValidationMessage("ddlSubjectRecruitmentBasic")
                    </div>
                </div>
                <div class="col-lg-3 col-md-3">
                    @Html.TextBox("ddlMarkRecruitmentBasic", "", new { @class = "form-control", type = "number" })
                </div>
            </div>
        </div>
        <div style="clear:both"></div>
        <div class="form-group">
            <strong>3. Đăng ký dự thi : </strong><br />
            <div class="col-lg-6 col-md-6">
                <div class="col-lg-8 col-md-8">
                    <div class="row">
                        @*<strong>Hệ đào tạo:</strong>
                        @Html.DropDownList("HDT", (SelectList)ViewBag.HeDaoTao, "Chọn Hệ đào tạo...", new { @class = "form-control valid", data_val = "true", data_val_required = " ", aria_required = "true", aria_describedby = "HDT-error HDT-error HDT-error", id = "TrainingSystemID2" })
                        <span class="field-validation-valid" data-valmsg-for="HDT" data-valmsg-replace="true"></span>
                        <br />*@
                        <strong>Khối thi: </strong>
                        @Html.DropDownList("MaKhoiThi", (SelectList)ViewBag.KhoiThi, "Chọn Khối thi...", new { @class = "form-control valid", data_val = "true", data_val_required = " ", aria_required = "true", aria_describedby = "MaKhoiThi-error MaKhoiThi-error MaKhoiThi-error", id = "GroupID2" })
                        <span class="field-validation-valid" data-valmsg-for="MaKhoiThi" data-valmsg-replace="true"></span>
                        <br />
                        <strong>Chuyên ngành : </strong>
                        @Html.DropDownListFor(m => m.MaChuyenNganh, new SelectList(Enumerable.Empty<SelectListItem>(), "MaChuyenNganh", "TenChuyenNganh"), "Chọn Chuyên ngành...", new { @class = "form-control", id = "MajorID2" })
                        @Html.ValidationMessageFor(model => model.MaChuyenNganh)
                    </div>
                </div>
            </div>
            <div class="col-lg-6 col-md-6">
                <div class="col-lg-8 col-md-8">
                    <div class="row">
                        @*<strong>Bậc đào tạo:</strong>
                        @Html.DropDownList("BacDaoTao3", new SelectList(Enumerable.Empty<SelectListItem>()), "Chọn Bậc đào tạo...", new { @class = "form-control valid", data_val = "true", data_val_required = " ", aria_required = "true", aria_describedby = "BacDaoTao3-error BacDaoTao3-error BacDaoTao3-error" })
                        <span class="field-validation-valid" data-valmsg-for="BacDaoTao3" data-valmsg-replace="true"></span>
                        <br />*@
                        <strong>Ngành : </strong>
                        @Html.DropDownList("MaNganh", new SelectList(Enumerable.Empty<SelectListItem>()), "Chọn Ngành...", new { @class = "form-control valid", id = "PhylumID2", data_val = "true", data_val_required = " ", aria_required = "true", aria_describedby = "MaNganh-error MaNganh-error MaNganh-error" })
                        <span class="field-validation-valid" data-valmsg-for="MaNganh" data-valmsg-replace="true"></span>
                        @*<br />
                            <div id="ddlChatLuongCao" style="visibility:hidden">
                                <strong>4. Tham gia Lớp đào tạo Chất lượng cao?</strong>
                                @Html.DropDownList("ChatLuongCao", ViewBag.ChatLuongCao as List<SelectListItem>, new { @class = "form-control" })
                            </div>*@
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    var dulieu;
    $("form").removeData("validator");
    $("form").removeData("unobtrusiveValidation");
    $.validator.unobtrusive.parse("form");
    // University
    $(document).ready(function () {
        //$("#TrainingSystemID2").change(function () {
        //    var ID = $(this).val();
        //    $("#BacDaoTao3").html('').append($('<option />', {
        //        value: 0,
        //        text: "Chọn Bậc đào tạo..."
        //    }));
        //    $.getJSON("/Common/GetTLByTS", { TSID: ID },
        //           function (data) {
        //               var select = $("#BacDaoTao3");
        //               select.empty();
        //               select.append($('<option />', {
        //                   value: 0,
        //                   text: "Chọn Bậc đào tạo..."
        //               }));
        //               $.each(data, function (index, itemData) {
        //                   select.append($('<option />', {
        //                       value: itemData.Value,
        //                       text: itemData.Text
        //                   }));
        //               });
        //           });
        //});
        // Step2_Examination
        //$("#BacDaoTao3").change(function () {
        //    var ID = $(this).val();
            $("#GroupID2").change(function () {
                $("#PhylumID2").html('').append($('<option/>', {
                    value: 0,
                    text: "Chọn Ngành..."
                }));
                var groupid = $(this).val();
                $.getJSON("/Common/GetPhylumByGroup", { TLID: $('#SendID').val(), makhoithi: groupid },
                        function (data) {
                            var select = $("#PhylumID2");
                            select.empty();
                            select.append($('<option/>', {
                                value: 0,
                                text: "Chọn Ngành..."
                            }));
                            $.each(data, function (index, itemData) {
                                select.append($('<option/>', {
                                    value: itemData.Value,
                                    text: itemData.Text
                                }));
                            });
                        });
            });
        //});
        $("#PhylumID2").change(function () {
            var phylumid = $(this).val();
            $("#MajorID2").html('').append($('<option/>', {
                value: 0,
                text: "Chọn Chuyên ngành..."
            }));
            $.getJSON("/Common/GetMajorByPhylum", { manganh: phylumid },
                   function (data) {
                       var select = $("#MajorID2");
                       select.empty();
                       select.append($('<option/>', {
                           value: 0,
                           text: "Chọn Chuyên ngành..."
                       }));
                       $.each(data, function (index, itemData) {
                           select.append($('<option/>', {
                               value: itemData.Value,
                               text: itemData.Text
                           }));
                       });
                   });
        });
    });
</script>